package com.bys.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * curl  -X POST "http://localhost:8104/actuator/refresh"
 * 使用 post 请求手动刷新
 */
@RestController
@RefreshScope
public class ConfigController {
    @Value("${config.info}")
    private String configInfo;
    @Value("${server.port}")
    private String serverPort;
    @GetMapping("/config/info")
    public String getConfigInfo(){
        return configInfo +"**** "+ serverPort;
    }

}
